﻿using DevTeam;

using System;
namespace ConfExpert.Forms.Depo._7C
{
    public partial class CikisPartisiSec : XPopupForm
    {
        public CikisPartisiSec()
        {
            InitializeComponent();
        }

        private void CikisPartisiSec_Load(object sender, EventArgs e)
        {
            splitContainerControl1.AutoSize();
            gvCKBatch.Init("GetCikisPartisiSec");
            gvCKBatch.AddDetailGrid(gvCikisPartisi, "CKBatchId");

            gvCKBatch.MakeColumnInvisible("CKBatchId");
            gvCikisPartisi.MakeColumnInvisible("CKBatchId");
            gvCikisPartisi.FormatAsDate("Tarih");
            gvCikisPartisi.FormatAsNumber(0, "CikanAdet");
            gvCikisPartisi.AddSummary("CikanAdet");
            gvCikisPartisi.MakeReadOnly();
            gvCKBatch.MakeReadOnly();
            gvCikisPartisi.DoubleClick += gvCikisPartisi_DoubleClick;

            gvCKBatch.BestFitColumns();
            gvCikisPartisi.BestFitColumns();
        }

        public int CikisPartisiId = 0;
        void gvCikisPartisi_DoubleClick(object sender, EventArgs e)
        {
            CikisPartisiId = gvCikisPartisi.GetFocusedRowCellValue("CikisPartisiId").ToInt();
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }
    }
}
